x86: fix nested HVM initialization
authorJan Beulich <JBeulich@suse.com>
Wed, 30 May 2012 08:21:04 +0000 (09:21 +0100)
committerJan Beulich <JBeulich@suse.com>
Wed, 30 May 2012 08:21:04 +0000 (09:21 +0100)
commit346e974dcabe907927d6169c5db936ffec19358b
tree8d2b39e7320831234ab71ae0bbb2d4b6079567f1
parentd74ca2863a63202e09fb147a039c9af5f810e468
x86: fix nested HVM initialization

- no need for calling nestedhvm_setup() explicitly (can be a normal
  init-call, and can be __init)
- calling _xmalloc() for multi-page, page-aligned memory regions is
  inefficient - use alloc_xenheap_pages() instead
- albeit an allocation error is unlikely here, add error handling
  nevertheless (and have nestedhvm_vcpu_initialise() bail if an error
  occurred during setup)
- nestedhvm_enabled() must no access d->arch.hvm_domain without first
  checking that 'd' actually represents a HVM domain

Signed-off-by: Jan Beulich <JBeulich@suse.com>
Committed-by: Keir Fraser <keir@xen.org>
xen/arch/x86/hvm/nestedhvm.c
xen/arch/x86/setup.c
xen/include/asm-x86/setup.h